var redo={///重做操作
    data(){
        return {
            cmd_redo_elements:{},                    
        }
    },
    methods:{
        cmd_redo_do:function(){
            if(!this.cmd_redo_elements[`${this.activePageIndex}`]) this.cmd_redo_elements[`${this.activePageIndex}`]=[];          
            this.itemsInstanceUnChkSel(this.activePageIndex);
			var that=this;
			var items= this.cmd_redo_elements[`${this.activePageIndex}`].pop();				
			if(items){
				items=JSON.parse(items);
				this.clearSVG();
				this.pages[this.activePageIndex].items=[];	
				for(var i=0;i<items.length;i++){
					this.renderItem(this.pages[this.activePageIndex],items[i]);
				}				
			}
			this.cmdo('records',true);
        },
        cmd_redo_active:function(){
            this.cmdActive['redo']=this.cmd_redo_elements[`${this.activePageIndex}`] && this.cmd_redo_elements[`${this.activePageIndex}`].length>0;
        }
    }
}

export default redo;
